package com.kla.power.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kla.power.vo.BaseEntity;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author WuZH
 * @since 2024-06-02
 */
@Getter
@Setter
@TableName("role_info")
@ApiModel(value = "RoleEntity对象", description = "角色表")
public class RoleEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("角色Id")
    @TableId(value = "id", type = IdType.INPUT)
    private String id;

    @ApiModelProperty("角色名称")
    @TableField("roleName")
    private String roleName;

    @ApiModelProperty("角色描述")
    @TableField("roleDesc")
    private String roleDesc;

    @ApiModelProperty("是否默认角色 1是0否")
    @TableField("isDefault")
    private Integer isDefault;

    @ApiModelProperty("所属商户,当不是默认角色时,就属于某个指定商户新建")
    @TableField("merchantId")
    private String merchantId;

    @TableField("createTime")
    private Date createTime;

    @TableField("changeTime")
    private Date changeTime;

    @TableField("isUsed")
    private Integer isUsed;

    @TableField(exist = false)
    private List<MenuEntity> menuEntities; // 新增角色时绑定的角色菜单
}
